<template>
  <h-modal @cancel="close" @ok="close" ok-text="确定" cancel-text="取消"
         :width="900" title="预览" :visible="visible" class="h-flow-history-modal">
    <div style="height: 500px; min-height: 100%; position: relative; overflow: hidden">
      <FlowPreview :history="true" :request="request" :process-instance-id="processInstanceId"/>
    </div>
  </h-modal>
</template>
<script>
import FlowPreview from '@/components/flow/FlowPreview/FlowPreview.vue';
import {createProps} from '@/utils';
import {Modal} from 'ant-design-vue'
import HModal from '@/components/HModal/HModal.vue';

export default {
  name: 'FlowPreviewModal',
  components: {
    HModal,
    FlowPreview, Modal
  },
  props: {
    processInstanceId: createProps(String),
    request: createProps(Object, () => ({
      baseURL: '/',
      headers: {},
    }))
  },
  data() {
    return {
      visible: false
    };
  },
  methods: {
    open() {
      this.visible = true;
    },
    close() {
      this.visible = false;
      this.$emit('close');
    },
  }
};
</script>
<style>
.h-flow-history-modal .ant-modal-body {
  padding: 0;
}
.h-flow-history-modal {

}
</style>